# Contributor: Alex McGrath <amk@amk.ie>
# Maintainer: Alex McGrath <amk@amk.ie>
pkgname=py3-mpv
pkgver=1.0.5
pkgrel=0
pkgdesc="Python interface to the mpv media player"
url="https://github.com/jaseg/python-mpv"
arch="noarch"
license="MIT"
depends="python3 mpv-libs"
makedepends="
	py3-setuptools
	py3-gpep517
	py3-installer
	py3-wheel
	"
options="!check" # tests require unpackaged xvfbwrapper

# release 1.0.3 has a typo where the version is vv$pkgver rather than v$pkgver
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jaseg/python-mpv/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-mpv-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
cefc0b38146d707a06e2b9e58951675be8d236c95e24de7665085641b24f7d7d5303130ebdb4c97f4f4c79b6de393c30656d9fc0dabf6760156d4aca8207d77c  py3-mpv-1.0.5.tar.gz
"
